package com.example.app.createmodel.singlemodel;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;


/**
 * 懒汉模式
 */
@Data
@Slf4j
public final class Person {
    public static final Person person = new Person();
    private String name;

    //构造函数私有化
    private Person() {
    }

    //提供一个全局的静态方法
    public static Person getPerson() {
        return person;
    }



}
